package com.wow.wa.bean;

import java.util.Calendar;
import java.util.Date;

public class DateBean {

	private Integer year;
	private Integer month;
	private Integer day;
	private Integer hh;
	private Integer mm;
	private Integer ss;

	public DateBean(Date date) {
		final Calendar calendar = Calendar.getInstance();
		calendar.setTime(date);
		this.year = calendar.get(Calendar.YEAR);
		this.month = calendar.get(Calendar.MONTH);
		this.day = calendar.get(Calendar.DAY_OF_MONTH);
		this.hh=calendar.get(Calendar.HOUR);
		this.mm=calendar.get(Calendar.MINUTE);
		this.ss=calendar.get(Calendar.SECOND);
	}

	public DateBean() {
		final Calendar calendar = Calendar.getInstance();
		this.year = calendar.get(Calendar.YEAR);
		this.month = calendar.get(Calendar.MONTH);
		this.day = calendar.get(Calendar.DAY_OF_MONTH);
		this.hh=calendar.get(Calendar.HOUR);
		this.mm=calendar.get(Calendar.MINUTE);
		this.ss=calendar.get(Calendar.SECOND);
				
	}
	public DateBean(int year,int month,int day){
		this.year=year;
		this.month=month;
		this.day=day;
	}

	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public Integer getMonth() {
		return month;
	}

	public void setMonth(Integer month) {
		this.month = month;
	}

	public Integer getDay() {
		return day;
	}

	public void setDay(Integer day) {
		this.day = day;
	}
	
	

	public Integer getHh() {
		return hh;
	}

	public void setHh(Integer hh) {
		this.hh = hh;
	}

	public Integer getMm() {
		return mm;
	}

	public void setMm(Integer mm) {
		this.mm = mm;
	}

	public Integer getSs() {
		return ss;
	}

	public void setSs(Integer ss) {
		this.ss = ss;
	}

	public String getYyymmdd() {
		return year.toString() + month.toString() + day.toString();
	}

	public Integer getIYearMonDay() {
		return Integer.parseInt(this.getYyymmdd());

	}
}
